.class public Lcom/xingbook/baike/d/d;
.super Landroid/widget/LinearLayout;

# interfaces
.implements Landroid/view/View$OnClickListener;
.implements Lcom/xingbook/park/c/a/n;


# instance fields
.field private a:Landroid/widget/ImageView;

.field private b:Lcom/xingbook/baike/d/c;

.field private c:I

.field private d:I

.field private e:I

.field private f:I

.field private g:I

.field private h:Lcom/xingbook/baike/b/a;

.field private i:Landroid/app/Activity;


# direct methods
.method public constructor <init>(Landroid/app/Activity;F)V
    .locals 11

    const v10, -0x333334

    const/4 v9, 0x0

    const v8, 0x7f0a0036

    const/4 v7, 0x1

    const/4 v6, -0x1

    invoke-virtual {p1}, Landroid/app/Activity;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    invoke-direct {p0, v0}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V

    iput-object p1, p0, Lcom/xingbook/baike/d/d;->i:Landroid/app/Activity;

    invoke-virtual {p1}, Landroid/app/Activity;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    const/high16 v1, 0x4150

    mul-float/2addr v1, p2

    float-to-int v1, v1

    iput v1, p0, Lcom/xingbook/baike/d/d;->c:I

    const/high16 v1, 0x41b0

    mul-float/2addr v1, p2

    float-to-int v1, v1

    iput v1, p0, Lcom/xingbook/baike/d/d;->d:I

    iget v1, p0, Lcom/xingbook/baike/d/d;->c:I

    iput v1, p0, Lcom/xingbook/baike/d/d;->e:I

    const/high16 v1, 0x4348

    mul-float/2addr v1, p2

    float-to-int v1, v1

    iput v1, p0, Lcom/xingbook/baike/d/d;->f:I

    const/high16 v1, 0x4120

    mul-float/2addr v1, p2

    float-to-int v1, v1

    iput v1, p0, Lcom/xingbook/baike/d/d;->g:I

    invoke-virtual {p0, v7}, Lcom/xingbook/baike/d/d;->setOrientation(I)V

    invoke-virtual {p0, p0}, Lcom/xingbook/baike/d/d;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    new-instance v1, Landroid/view/View;

    invoke-direct {v1, v0}, Landroid/view/View;-><init>(Landroid/content/Context;)V

    invoke-virtual {v1, v10}, Landroid/view/View;->setBackgroundColor(I)V

    new-instance v2, Landroid/widget/LinearLayout$LayoutParams;

    invoke-direct {v2, v6, v7}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    iget v3, p0, Lcom/xingbook/baike/d/d;->e:I

    iput v3, v2, Landroid/widget/LinearLayout$LayoutParams;->topMargin:I

    invoke-virtual {v1, v2}, Landroid/view/View;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    invoke-virtual {p0, v1}, Lcom/xingbook/baike/d/d;->addView(Landroid/view/View;)V

    new-instance v1, Landroid/widget/RelativeLayout;

    invoke-direct {v1, v0}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;)V

    iget v2, p0, Lcom/xingbook/baike/d/d;->c:I

    iget v3, p0, Lcom/xingbook/baike/d/d;->d:I

    iget v4, p0, Lcom/xingbook/baike/d/d;->c:I

    iget v5, p0, Lcom/xingbook/baike/d/d;->d:I

    invoke-virtual {v1, v2, v3, v4, v5}, Landroid/widget/RelativeLayout;->setPadding(IIII)V

    invoke-virtual {v1, v6}, Landroid/widget/RelativeLayout;->setBackgroundColor(I)V

    new-instance v2, Landroid/widget/LinearLayout$LayoutParams;

    iget v3, p0, Lcom/xingbook/baike/d/d;->f:I

    iget v4, p0, Lcom/xingbook/baike/d/d;->d:I

    mul-int/lit8 v4, v4, 0x2

    add-int/2addr v3, v4

    invoke-direct {v2, v6, v3}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    invoke-virtual {v1, v2}, Landroid/widget/RelativeLayout;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    invoke-virtual {p0, v1}, Lcom/xingbook/baike/d/d;->addView(Landroid/view/View;)V

    new-instance v2, Landroid/view/View;

    invoke-direct {v2, v0}, Landroid/view/View;-><init>(Landroid/content/Context;)V

    invoke-virtual {v2, v10}, Landroid/view/View;->setBackgroundColor(I)V

    new-instance v3, Landroid/widget/LinearLayout$LayoutParams;

    invoke-direct {v3, v6, v7}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    invoke-virtual {v2, v3}, Landroid/view/View;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    invoke-virtual {p0, v2}, Lcom/xingbook/baike/d/d;->addView(Landroid/view/View;)V

    new-instance v2, Landroid/widget/ImageView;

    invoke-direct {v2, v0}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    iput-object v2, p0, Lcom/xingbook/baike/d/d;->a:Landroid/widget/ImageView;

    iget-object v2, p0, Lcom/xingbook/baike/d/d;->a:Landroid/widget/ImageView;

    sget-object v3, Landroid/widget/ImageView$ScaleType;->FIT_XY:Landroid/widget/ImageView$ScaleType;

    invoke-virtual {v2, v3}, Landroid/widget/ImageView;->setScaleType(Landroid/widget/ImageView$ScaleType;)V

    iget-object v2, p0, Lcom/xingbook/baike/d/d;->a:Landroid/widget/ImageView;

    iget v3, p0, Lcom/xingbook/baike/d/d;->g:I

    invoke-virtual {v2, v9, v9, v3, v9}, Landroid/widget/ImageView;->setPadding(IIII)V

    iget-object v2, p0, Lcom/xingbook/baike/d/d;->a:Landroid/widget/ImageView;

    invoke-virtual {v2, v8}, Landroid/widget/ImageView;->setId(I)V

    new-instance v2, Landroid/widget/RelativeLayout$LayoutParams;

    iget v3, p0, Lcom/xingbook/baike/d/d;->f:I

    iget v4, p0, Lcom/xingbook/baike/d/d;->g:I

    add-int/2addr v3, v4

    iget v4, p0, Lcom/xingbook/baike/d/d;->f:I

    invoke-direct {v2, v3, v4}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    iget-object v3, p0, Lcom/xingbook/baike/d/d;->a:Landroid/widget/ImageView;

    invoke-virtual {v3, v2}, Landroid/widget/ImageView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    iget-object v2, p0, Lcom/xingbook/baike/d/d;->a:Landroid/widget/ImageView;

    invoke-virtual {v1, v2}, Landroid/widget/RelativeLayout;->addView(Landroid/view/View;)V

    new-instance v2, Lcom/xingbook/baike/d/c;

    invoke-direct {v2, v0}, Lcom/xingbook/baike/d/c;-><init>(Landroid/content/Context;)V

    iput-object v2, p0, Lcom/xingbook/baike/d/d;->b:Lcom/xingbook/baike/d/c;

    new-instance v0, Landroid/widget/RelativeLayout$LayoutParams;

    const/4 v2, -0x2

    invoke-direct {v0, v6, v2}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    invoke-virtual {v0, v7, v8}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(II)V

    const/4 v2, 0x6

    invoke-virtual {v0, v2, v8}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(II)V

    const/16 v2, 0x8

    invoke-virtual {v0, v2, v8}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(II)V

    iget-object v2, p0, Lcom/xingbook/baike/d/d;->b:Lcom/xingbook/baike/d/c;

    invoke-virtual {v2, v0}, Lcom/xingbook/baike/d/c;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    iget-object v0, p0, Lcom/xingbook/baike/d/d;->b:Lcom/xingbook/baike/d/c;

    invoke-virtual {v1, v0}, Landroid/widget/RelativeLayout;->addView(Landroid/view/View;)V

    return-void
.end method


# virtual methods
.method public a(Lcom/xingbook/b/n;IZ)V
    .locals 7

    const/4 v3, 0x1

    const/4 v6, 0x0

    :try_start_0
    check-cast p1, Lcom/xingbook/baike/b/a;

    iput-object p1, p0, Lcom/xingbook/baike/d/d;->h:Lcom/xingbook/baike/b/a;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    iget-object v0, p0, Lcom/xingbook/baike/d/d;->h:Lcom/xingbook/baike/b/a;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/baike/d/d;->h:Lcom/xingbook/baike/b/a;

    invoke-virtual {v0, v6}, Lcom/xingbook/baike/b/a;->d(Z)Ljava/lang/String;

    move-result-object v0

    iget-object v1, p0, Lcom/xingbook/baike/d/d;->a:Landroid/widget/ImageView;

    const v2, 0x7f020055

    const/4 v5, 0x0

    move v4, v3

    invoke-static/range {v0 .. v5}, Lcom/xingbook/c/k;->a(Ljava/lang/String;Landroid/widget/ImageView;IZZF)V

    iget-object v0, p0, Lcom/xingbook/baike/d/d;->b:Lcom/xingbook/baike/d/c;

    iget-object v1, p0, Lcom/xingbook/baike/d/d;->h:Lcom/xingbook/baike/b/a;

    invoke-virtual {v0, v1}, Lcom/xingbook/baike/d/c;->a(Lcom/xingbook/baike/b/a;)V

    invoke-virtual {p0, v6}, Lcom/xingbook/baike/d/d;->setVisibility(I)V

    :goto_1
    return-void

    :cond_0
    const/16 v0, 0x8

    invoke-virtual {p0, v0}, Lcom/xingbook/baike/d/d;->setVisibility(I)V

    goto :goto_1

    :catch_0
    move-exception v0

    goto :goto_0
.end method

.method public getResType()I
    .locals 1

    const/16 v0, 0xd0

    return v0
.end method

.method public onClick(Landroid/view/View;)V
    .locals 2

    iget-object v0, p0, Lcom/xingbook/baike/d/d;->h:Lcom/xingbook/baike/b/a;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/baike/d/d;->i:Landroid/app/Activity;

    if-nez v0, :cond_1

    invoke-virtual {p0}, Lcom/xingbook/baike/d/d;->getContext()Landroid/content/Context;

    move-result-object v0

    :goto_0
    iget-object v1, p0, Lcom/xingbook/baike/d/d;->h:Lcom/xingbook/baike/b/a;

    invoke-static {v0, v1}, Lcom/xingbook/c/t;->a(Landroid/content/Context;Lcom/xingbook/b/n;)V

    :cond_0
    return-void

    :cond_1
    iget-object v0, p0, Lcom/xingbook/baike/d/d;->i:Landroid/app/Activity;

    goto :goto_0
.end method
